<template>
  <div>
    <input type="text" v-model="Input1.value" @keydown.enter="handleEnter">
  </div>
</template>

<script lang='ts'>
import { Vue, setup } from 'vue-class-component'
import { ref } from 'vue'

// 在这里处理指定响应式数据的逻辑
const useInput = () => {
  const res = setup(() => {
    const Input1 = ref('')
    return {
      Input1
    }
  })
  return res
}

export default class WatchTestClassCompnt extends Vue {
  public Input1 = useInput()
  public handleEnter = ($event:InputEvent):void => {
    console.log($event.target)
  }

  public alertMsg = ():void => {
    alert('rnm')
  }
}
</script>

<style>

</style>
